﻿using BCEntity.OA.PageBusiness.PageBusinessConfig;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace BCData.OA.PageBusiness.PageBusinessConfig
{
    /// <summary>
    /// OA系统页面业务配置
    /// </summary>
	public interface IPageBusinessConfigData
    {
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="pageBusinessConfigId">OA系统页面业务配置Id</param>
        Task<bool> Exists(long pageBusinessConfigId);
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="pageBusinessCode">OA系统页面业务配置编码</param>
        Task<bool> Exists(string pageBusinessCode);
        /// <summary>
        /// 增加OA系统页面业务配置
        /// </summary>
        /// <param name="entity">OA系统页面业务配置信息</param>
        Task<PageBusinessConfigEntity> Add(PageBusinessConfigEntity entity);
        /// <summary>
        /// 更新OA系统页面业务配置
        /// </summary>
        /// <param name="entity">OA系统页面业务配置信息</param>
        Task<PageBusinessConfigEntity> Update(PageBusinessConfigEntity entity);
        /// <summary>
        /// 删除OA系统页面业务配置
        /// </summary>
        /// <param name="pageBusinessConfigId">OA系统页面业务配置Id</param>
        Task<bool> Delete(long pageBusinessConfigId);
        /// <summary>
        /// 获取OA系统页面业务配置
        /// </summary>
        /// <param name="pageBusinessConfigId">OA系统页面业务配置Id</param>
        Task<PageBusinessConfigEntity> GetEntity(long pageBusinessConfigId);
        /// <summary>
        /// 获取OA系统页面业务配置列表
        /// </summary>
        /// <param name="companyId">公司Id</param>
        Task<IEnumerable<PageBusinessConfigEntity>> GetList(int companyId);
        /// <summary>
        /// 获取OA系统页面业务配置分页列表
        /// </summary>
        /// <param name="companyId">公司Id</param>
        /// <param name="pageBusinessName">页面业务配置名称</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">OA系统页面业务配置每页数据条数</param>
        Task<(IEnumerable<PageBusinessConfigEntity>, int)> Query(int companyId,string pageBusinessName, DateTime? start, DateTime? end, int pageIndex, int pageSize);
        #endregion  成员方法
    }
}
